This invention relates generally to digital signal processing and more particularly to sample rate conversion in an analog to digital converter.
In digital audio applications, an audio Codec (coder/decoder) is required to convert input analog audio signals into digital audio signals and to convert processed digital audio signals into output analog audio signals. Accordingly, the audio Codec includes an analog to digital converter (ADC) to convert the analog input audio signals into the digital signals and a digital to analog converter (DAC) to convert the processed digital signals into the analog output audio signals. The ADC and DAC may be implemented using a variety of topologies.
One implementation of an ADC includes a Sigma Delta modulator and a digital decimation filter. The Sigma Delta modulator is operably coupled to receive an analog input signal and to produce therefrom an oversampled digital signal. The digital decimation filter filters the oversampled digital signal at a rate that is a fraction (e.g., xc2xdn) of the oversampling rate used by the Sigma Delta modulator to produce digital signals. Depending on the desired rate of the digital signals, the output of the decimation filter may be the output of the ADC or it may be further filtered. For an AC97 specification compliant audio Codec, the Codec includes a master clock that operates at a rate of 24.576 MHz, which is divided by a factor of n to produce the oversampling rate of the Sigma Delta modulator. For example, the oversampling rate may be 12.288 MHz (divide by 2) or 6.144 MHz (divide by 4). The decimation filter of an AC97 audio Codec may operate at a rate that is {fraction (1/32)}nd of the oversampling rate. As such the decimation filter outputs a digital data stream at a rate of 384 KHz for a 12.288 MHz oversampling rate and at a rate of 192 KHz for a 6.144 MHz oversampling rate.
Current digital audio rates are specified, for various applications, to be 48 KHz, 44.1 KHz, 22.05 KHz, 16 KHz, 11.025 KHz or 8 KHz. To achieve the 48 KHz sampling rate, the output digital data stream of the decimation filter is further filtered at a rate that is a fraction of the rate used by the decimation filter. As such, to achieve the 48 KHz output, the decimation filter includes further filtering that reduces the 384 KHz rate by a factor of 8. To achieve the 48 KHz output stream when the oversampling rate is 6.144 MHz, the decimation filter may be adjusted to produce a 384 KHz data stream and the further filtering would be the same as just discussed. To achieve a 24 KHz output rate, the rate of the further filtering in the decimation filter rate is adjusted by a factor of two from the previous example. To obtain other output rates while maintaining the divide-by-8 in the further filtering, the rate of the decimation filter is changed. For example, if the output sample rate is 16 KHz, the decimation filter rate would be a divide by 96 for a 12.288 MHz oversampling rate and would be a divide by 48 for a 6.144 MHz.
The rates of 44.1 KHz, 22.05 KHz and 11.025 KHz cannot be directly obtained by dividing the master clock by an integer. To obtain such rates, sample rate conversion is needed. One known sample rate conversion technique determines an integer ratio between a xc2xdn multiplier rate and the desired rate. The numerator of the ratio is used to upscale the oversampling rate of the Sigma Delta modulator and the denominator of the ratio is used to divide the resultant to obtain the new oversampling rate. For example, assume that the xc2xdn multiplier rate corresponds to 48 KHz and the desired rate is 44.1 KHz. An integer ratio of N to M for 44.1 to 48, equals 147 to 160. For this example, the oversampling rate to produce a 48 KHz output is upscaled by 147. For an oversampling rate of 12.288 MHz, the upscaled rate is approximately 1.8 GHz. The converted oversampling rate equals 1.8 GHz divided by 160, which is approximately 11.29 MHz. With this converted oversampling rate, xc2xdn multipliers may be used to obtain the desired output rates.
While the above described implementation works, it is impractical for commercial grade audio codecs due to the costs associated with a 1.8 GHz clock. Therefore, a need exists for a sample rate conversion technique that is commercially viable for use in analog to digital converters.